package net.vinote.smart.platform.controller;

import java.io.IOException;
import java.io.Writer;

import javax.servlet.http.HttpServletRequest;

import net.vinote.smart.platform.service.util.RunJavaMethod;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PageFunctionController {
	@RequestMapping("runJavaMethod.json")
	public void runJavaMethod(HttpServletRequest request, Writer writer) {
		RunJavaMethod run = new RunJavaMethod();
		try {
			writer.write(run.runJavaMethod(request).toString());
			writer.flush();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
